home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 003 / _gs / !GS / Arc-Make < prev    next >
Text File  |  1991-12-06  |  25KB  |  767 lines

  1. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # Generic makefile for Ghostscript.
  21. # Acorn Archimedes version.
  22.  
  23. # Options - see below
  24. XE=
  25. AK=
  26. UNIQ=
  27. DS=.
  28. OBJ=o
  29.  
  30. # Paths
  31. RLIB=$.RISC_OSLib
  32. WIMPPLUS=$.Tools.WimpPlus
  33. MAKEFILE=Arc-Make
  34.  
  35. # Of the following, only DEVICES is used on the Archimedes
  36. DEVICES=arc
  37. DEVICE_DEVS=arc.dev
  38. DEVICE_OBJS=$(arc_)
  39.  
  40. # Compiler and linker options
  41. # To get debugging, add -g to the C options and -D to the link options
  42. CC=cc
  43. LINK=link -aif -o
  44. CFLAGS=-c -DARC -throwback -I$(WIMPPLUS) -I$(RLIB)
  45. EXTRALIBS=$(WIMPPLUS).Wimpplus $(RLIB).o.RISC_OSLib <CLib$Dir>.o.Stubs
  46. CCDEBUG=$(CC) $(CFLAGS) -g
  47. LINKDEBUG=link -aif -D -o
  48.  
  49. # Rule patterns
  50. .SUFFIXES: .o .c
  51. .c.o:; $(CC) $(CFLAGS) -o $@ c.$*
  52.  
  53.  
  54. # The platform-specific makefiles `include' this file.
  55. # They define the following symbols:
  56. #    GS_INIT - the name of the initialization file for Ghostscript,
  57. #        normally gs_init.ps.
  58. # ARC: defined in header file because of compiler bug
  59. #    GS_LIB_DEFAULT - the default directory/ies for searching for the
  60. #        initialization and font files at run time.
  61. # ARC: defined in header file because of compiler bug
  62. #    DEVICES, DEVICE_DEVS, DEVICE_OBJS - the devices to include in the
  63. #        executable.  See gdevs.mak for details.
  64. #    FEATURES - the optional features to include in the executable.
  65. #        (Currently no such features are defined; this is just a
  66. #        place-holder.)
  67. # It is very unlikely that anyone would want to edit the remaining
  68. #   symbols, but we describe them here for completeness:
  69. #    Q - the string that causes the shell to pass a " to a program
  70. #        (" on MS-DOS, \" on Unix).
  71. #    XE - the extension for executable files (e.g., null or .exe).
  72. #    OBJ - the extension for relocatable object files (e.g., o or obj).
  73. #    CCC - the C invocation for normal compilation.
  74. #    CC0 - a C invocation with the fewer possible flags.  Needed because
  75. #        MS-DOS limits the length of command lines to 128 characters.
  76. #    CCINT - the C invocation for compiling the main interpreter module,
  77. #        normally the same as CCC: this is needed because the
  78. #        Borland compiler generates *worse* code for this module
  79. #        (but only this module) when optimization (-O) is turned on.
  80. #    AK - if source files must be converted from ANSI to K&R syntax,
  81. #        this is ansi2knr$(XE); if not, it is null.
  82. #    UNIQ - null on systems that provide the uniq utility,
  83. #        uniq$(XE) on systems where we have to provide our own.
  84. #    DS - the directory separator (/ or \).
  85. # The platform-specific makefiles must also include rules for creating
  86. #   ansi2knr$(XE) and genarch$(XE) from the corresponding .c files,
  87. #   and for making arch.h by executing genarch$(XE).  (This
  88. #   shouldn't really be necessary, but Turbo C and Unix C treat the -o
  89. #   switch slightly differently (Turbo C requires no following space,
  90. #   Unix C requires a following space), and I haven't found a way to capture
  91. #   the difference in a macro; also, Unix requires ./ because . may not be
  92. #   in the search path, whereas MS-DOS always looks in the current
  93. #   directory first.)
  94.  
  95. default: gs$(XE)
  96.  
  97. # test: gt$(XE)
  98.  
  99. # clean:
  100. #     rm -f *.$(OBJ) *.a core gmon.out
  101. #     rm -f *.dev gconfig.h gconfig.tr
  102. #     rm -f t _temp_* _temp_*.* libc*.tr *.map *.sym
  103. #     rm -f ansi2knr$(XE) genarch$(XE) uniq$(XE) arch.h gs$(XE)
  104.  
  105. # Note: Unix uses malloc.h and memory.h;
  106. # Turbo C uses alloc.h, stdlib.h, and mem.h.
  107. # 4.2bsd uses strings.h; other systems use string.h.
  108. # gcc on VMS doesn't have a math.h.
  109. # We handle this by using local include files called
  110. # malloc_.h, math_.h, memory_.h, and string_.h
  111. # that perform appropriate indirection.
  112.  
  113. # Auxiliary programs
  114.  
  115. # genarch may cause a (deliberate) addressing fault,
  116. # so we invoke it with a preceding -.
  117. # ARC - don't do this; also output to h.arch
  118.  
  119. arch.h: genarch$(XE)
  120.   genarch h.arch
  121. #    - .$(DS)genarch arch.h
  122.  
  123. # -------------------------------- Library -------------------------------- #
  124. # Acorn uses stamp rather than touch - changed in what follows
  125. TOUCH=stamp
  126.  
  127. gs.h: std.h
  128.     $(TOUCH) h.gs
  129. #    touch gs.h
  130.  
  131. gx.h: gs.h
  132.     $(TOUCH) h.gx
  133. #    touch gx.h
  134.  
  135. GX=$(AK) std.h gx.h
  136. GXERR=$(GX) gserrors.h
  137.  
  138. ###### High-level facilities
  139.  
  140. gschar.$(OBJ): gschar.c $(GXERR) \
  141.   gxfixed.h gxarith.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gstype1.h gspath.h gzpath.h gzcolor.h gzstate.h
  142.  
  143. gschar0.$(OBJ): gschar0.c $(GXERR) \
  144.   gxfixed.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gzstate.h
  145.  
  146. gscolor.$(OBJ): gscolor.c $(GXERR) \
  147.   gxfixed.h gxmatrix.h gxdevice.h gzstate.h gzcolor.h gzht.h
  148.  
  149. gscoord.$(OBJ): gscoord.c $(GXERR) \
  150.   gxfixed.h gxmatrix.h gzdevice.h gzstate.h gscoord.h
  151.  
  152. gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  153.   gxfixed.h gxmatrix.h gxbitmap.h gxdevmem.h gzstate.h gzdevice.h
  154.  
  155. gsfile.$(OBJ): gsfile.c $(GXERR) \
  156.   gsmatrix.h gxdevice.h gxdevmem.h
  157.  
  158. gsfont.$(OBJ): gsfont.c $(GXERR) \
  159.   gxdevice.h gxfixed.h gxmatrix.h gxfont.h gxfdir.h gzstate.h
  160.  
  161. gsimage.$(OBJ): gsimage.c $(GXERR) \
  162.   arch.h gxfixed.h gxarith.h gxmatrix.h gspaint.h gzcolor.h gzdevice.h gzpath.h gzstate.h gximage.h
  163.  
  164. gsim2out.$(OBJ): gsim2out.c $(GXERR) \
  165.   gsstate.h gsmatrix.h gscoord.h gxfixed.h gxtype1.h
  166.  
  167. gsline.$(OBJ): gsline.c $(GXERR) \
  168.   gxfixed.h gxmatrix.h gzstate.h gzline.h
  169.  
  170. gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  171.   gxfixed.h gxarith.h gxmatrix.h
  172.  
  173. gsmisc.$(OBJ): gsmisc.c $(GX)
  174.  
  175. gspaint.$(OBJ): gspaint.c $(GX) \
  176.   gxfixed.h gxmatrix.h gspaint.h gzpath.h gzstate.h gzdevice.h gximage.h
  177.  
  178. gspath.$(OBJ): gspath.c $(GXERR) \
  179.   gxfixed.h gxmatrix.h gxpath.h gzstate.h
  180.  
  181. gspath2.$(OBJ): gspath2.c $(GXERR) \
  182.   gspath.h gxfixed.h gxmatrix.h gzstate.h gzpath.h gzdevice.h
  183.  
  184. gsstate.$(OBJ): gsstate.c $(GXERR) \
  185.   gxfixed.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzht.h gzline.h gzpath.h
  186.  
  187. gstdev.$(OBJ): gstdev.c $(GX) \
  188.   gxbitmap.h gxdevice.h gxfixed.h gxmatrix.h
  189.  
  190. gstype1.$(OBJ): gstype1.c $(GXERR) \
  191.   gxarith.h gxfixed.h gxmatrix.h gxchar.h gxdevmem.h gxop1.h gxtype1.h \
  192.   gzstate.h gzdevice.h gzpath.h
  193.  
  194. ###### Low-level facilities
  195.  
  196. ### Nested include files
  197.  
  198. gsstate.h: gscolor.h
  199.     $(TOUCH) h.gsstate
  200. #    touch gsstate.h
  201.  
  202. gxchar.h: gschar.h
  203.     $(TOUCH) h.gxchar
  204. #    touch gxchar.h
  205.  
  206. gxfont.h: gsfont.h
  207.     $(TOYCH) h.gxfont
  208. #    touch gxfont.h
  209.  
  210. gxmatrix.h: gsmatrix.h
  211.     $(TOUCH) h.gxmatrix
  212. #    touch gxmatrix.h
  213.  
  214. gxtype1.h: gstype1.h
  215.     $(TOUCH) h.gxtype1
  216. #    touch gxtype1.h
  217.  
  218. gzcolor.h: gscolor.h
  219.     $(TOUCH) h.gzcolor
  220. #    touch gzcolor.h
  221.  
  222. gzdevice.h: gxdevice.h
  223.     $(TOUCH) h.gzdevice
  224. #    touch gzdevice.h
  225.  
  226. gzpath.h: gxpath.h
  227.     $(TOUCH) h.gzpath
  228. #    touch gzpath.h
  229.  
  230. gzstate.h: gsstate.h
  231.     $(TOUCH) h.gzstate
  232. #    touch gzstate.h
  233.  
  234. ### Executable code
  235.  
  236. gxcache.$(OBJ): gxcache.c $(GXERR) \
  237.   gxfixed.h gxmatrix.h gspaint.h gzdevice.h gzcolor.h gxdevmem.h gxfont.h gxfdir.h gxchar.h gzstate.h gzpath.h
  238.  
  239. gxclist.$(OBJ): gxclist.c $(GXERR) \
  240.   gsmatrix.h gxbitmap.h gxclist.h gxdevice.h gxdevmem.h
  241.  
  242. gxcolor.$(OBJ): gxcolor.c $(GXERR) \
  243.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzht.h gzstate.h
  244.  
  245. gxdither.$(OBJ): gxdither.c $(GX) \
  246.   gxfixed.h gxmatrix.h gzstate.h gzdevice.h gzcolor.h gzht.h
  247.  
  248. gxdraw.$(OBJ): gxdraw.c $(GX) \
  249.   gxfixed.h gxmatrix.h gxbitmap.h gzcolor.h gzdevice.h gzstate.h
  250.  
  251. gxfill.$(OBJ): gxfill.c $(GXERR) \
  252.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzpath.h gzstate.h
  253.  
  254. gxht.$(OBJ): gxht.c $(GXERR) \
  255.   gxfixed.h gxmatrix.h gxbitmap.h gzstate.h gzcolor.h gzdevice.h gzht.h
  256.  
  257. gxpath.$(OBJ): gxpath.c $(GXERR) \
  258.   gxfixed.h gzpath.h
  259.  
  260. gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  261.   gxfixed.h gxarith.h gzpath.h
  262.  
  263. gxstroke.$(OBJ): gxstroke.c $(GXERR) \
  264.   gxfixed.h gxarith.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzline.h gzpath.h
  265.  
  266. ###### The "memory" device
  267.  
  268. gdevmem.$(OBJ): gdevmem.c $(AK) \
  269.   gs.h arch.h gxbitmap.h gsmatrix.h gxdevice.h gxdevmem.h
  270.  
  271. ###### Files dependent on the set of installed devices.
  272. ###### Generating gconfig.h also generates gconfig.tr.
  273.  
  274. # gconfig.h gconfig.tr: gdevs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS)
  275. #    .$(DS)gsconfig $(DEVICES) + $(FEATURES)
  276.  
  277. # Arc version
  278. # For the archimedes, gsconfig is a C program
  279. gsconfig: gsconfig.c
  280.  cc gsconfig.c
  281.  squeeze gsconfig
  282.  
  283. gconfig.h: $(MAKEFILE) gsconfig
  284.  gsconfig $(DEVICES) + $(FEATURES)
  285.  
  286. gconfig.$(OBJ): gconfig.c $(AK) gconfig.h $(MAKEFILE)
  287.  $(CC) $(CFLAGS) gconfig.c
  288. #    $(CC0) -DGS_LIB_DEFAULT=$(Q)$(GS_LIB_DEFAULT)$(Q) -DGS_INIT=$(Q)$(GS_INIT)$(Q) gconfig.c
  289.  
  290.  
  291. ###### On Unix, we pre-link all of the library except the back end.
  292. ###### On MS-DOS, we have to do the whole thing at once.
  293.  
  294. LIB=gschar.$(OBJ) gschar0.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
  295.  gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) \
  296.  gsimage.$(OBJ) gsim2out.$(OBJ) \
  297.  gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  298.  gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
  299.  gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) \
  300.  gxcache.$(OBJ) gxclist.$(OBJ) gxcolor.$(OBJ) \
  301.  gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  302.  gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \
  303.  gdevmem.$(OBJ) gconfig.$(OBJ)
  304.  
  305. # ------------------------------ Interpreter ------------------------------ #
  306.  
  307. ###### Utilities
  308.  
  309. GH=$(AK) ghost.h
  310.  
  311. ialloc.$(OBJ): ialloc.c $(AK) gs.h alloc.h astate.h
  312.  
  313. idebug.$(OBJ): idebug.c $(GH) \
  314.  iutil.h dict.h name.h ostack.h opdef.h packed.h store.h
  315.  
  316. idict.$(OBJ): idict.c $(GH) alloc.h errors.h name.h save.h store.h dict.h
  317.  
  318. iinit.$(OBJ): iinit.c $(GH) alloc.h dict.h errors.h name.h oper.h store.h
  319.  
  320. iname.$(OBJ): iname.c $(GH) alloc.h errors.h name.h store.h
  321.  
  322. isave.$(OBJ): isave.c $(GH) alloc.h astate.h name.h save.h store.h
  323.  
  324. iscan.$(OBJ): iscan.c $(GH) arch.h alloc.h dict.h errors.h iutil.h \
  325.  name.h ostack.h packed.h store.h stream.h scanchar.h
  326.  
  327. iutil.$(OBJ): iutil.c $(GH) \
  328.  errors.h alloc.h iutil.h name.h ostack.h oper.h store.h \
  329.  gsmatrix.h gxdevice.h gzcolor.h
  330.  
  331. stream.$(OBJ): stream.c $(AK) std.h stream.h scanchar.h gxfixed.h gstype1.h
  332.  
  333. ###### Operators
  334.  
  335. ghost.h: gx.h
  336.     $(TOUCH) h.ghost
  337. #    touch ghost.h
  338.  
  339. oper.h: iutil.h opdef.h ostack.h
  340.     $(TOUCH) h.oper
  341. #    touch oper.h
  342.  
  343. OP=$(GH) errors.h oper.h ostack.h
  344.  
  345. ### Non-graphics operators
  346.  
  347. zarith.$(OBJ): zarith.c $(OP) store.h
  348.  
  349. zarray.$(OBJ): zarray.c $(OP) alloc.h packed.h store.h
  350.  
  351. zcontrol.$(OBJ): zcontrol.c $(OP) estack.h iutil.h store.h
  352.  
  353. zdict.$(OBJ): zdict.c $(OP) dict.h store.h
  354.  
  355. zfile.$(OBJ): zfile.c $(OP) gp.h \
  356.   alloc.h estack.h file.h iutil.h save.h stream.h store.h
  357.  
  358. zfileio.$(OBJ): zfileio.c $(OP) \
  359.   estack.h file.h store.h stream.h \
  360.   gsmatrix.h gxdevice.h gxdevmem.h
  361.  
  362. zgeneric.$(OBJ): zgeneric.c $(OP) dict.h estack.h name.h packed.h store.h
  363.  
  364. zmath.$(OBJ): zmath.c $(OP) store.h
  365.  
  366. zmisc.$(OBJ): zmisc.c $(OP) gp.h alloc.h dict.h name.h packed.h store.h \
  367.   gstype1.h gxfixed.h
  368.  
  369. zpacked.$(OBJ): zpacked.c $(OP) \
  370.   arch.h alloc.h dict.h name.h packed.h save.h store.h
  371.  
  372. zrelbit.$(OBJ): zrelbit.c $(OP) store.h dict.h
  373.  
  374. zstack.$(OBJ): zstack.c $(OP) store.h
  375.  
  376. zstring.$(OBJ): zstring.c $(OP) alloc.h iutil.h name.h store.h stream.h
  377.  
  378. ztype.$(OBJ): ztype.c $(OP) dict.h iutil.h name.h stream.h store.h
  379.  
  380. zvmem.$(OBJ): zvmem.c $(OP) alloc.h estack.h save.h state.h store.h \
  381.   gsmatrix.h gsstate.h
  382.  
  383. ###### Graphics operators
  384.  
  385. zchar.$(OBJ): zchar.c $(OP) gxmatrix.h gschar.h gstype1.h gxdevice.h gxfixed.h gxfont.h gzpath.h gzstate.h alloc.h dict.h font.h estack.h state.h store.h
  386.  
  387. zcolor.$(OBJ): zcolor.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h gzcolor.h iutil.h state.h store.h
  388.  
  389. zdevice.$(OBJ): zdevice.c $(OP) alloc.h state.h gsmatrix.h gsstate.h gxdevice.h store.h
  390.  
  391. zfont.$(OBJ): zfont.c $(OP) gsmatrix.h gxdevice.h gxfont.h gxfdir.h \
  392.  alloc.h font.h dict.h name.h packed.h save.h state.h store.h
  393.  
  394. zfont0.$(OBJ): zfont0.c $(OP) gsmatrix.h gxdevice.h gxfont.h \
  395.  alloc.h font.h dict.h name.h state.h store.h
  396.  
  397. zfont2.$(OBJ): zfont2.c $(OP) gsmatrix.h gxdevice.h gschar.h gxfixed.h gxfont.h \
  398.  alloc.h dict.h font.h name.h packed.h store.h
  399.  
  400. zgstate.$(OBJ): zgstate.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  401.  
  402. zht.$(OBJ): zht.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h state.h store.h
  403.  
  404. zmatrix.$(OBJ): zmatrix.c $(OP) gsmatrix.h state.h gscoord.h store.h
  405.  
  406. zpaint.$(OBJ): zpaint.c $(OP) alloc.h estack.h gsmatrix.h gspaint.h state.h store.h
  407.  
  408. zpath.$(OBJ): zpath.c $(OP) gsmatrix.h gspath.h state.h store.h
  409.  
  410. zpath2.$(OBJ): zpath2.c $(OP) alloc.h estack.h gspath.h state.h store.h
  411.  
  412. ###### Linking
  413.  
  414. INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) iinit.$(OBJ) iname.$(OBJ) \
  415.  interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) stream.$(OBJ) \
  416.  zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
  417.  zfile.$(OBJ) zfileio.$(OBJ) zgeneric.$(OBJ) \
  418.  zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zrelbit.$(OBJ) \
  419.  zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  420.  zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont0.$(OBJ) zfont2.$(OBJ) \
  421.  zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
  422.  zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  423.  
  424. # ----------------------------- Main program ------------------------------ #
  425.  
  426. # Utilities shared between platforms
  427.  
  428. gsmain.$(OBJ): gsmain.c $(GX) \
  429.   gp.h gsmatrix.h gxdevice.h
  430.  
  431. # The default font
  432.  
  433. uglyr.gsf: ugly10.bdf bdftops.ps gs$(XE)
  434.  gs -q -dNODISPLAY -- bdftops.ps ugly10.bdf uglyr.gsf
  435. #    .$(DS)gs -q -dNODISPLAY -- bdftops.ps ugly10.bdf uglyr.gsf
  436.  
  437. # Interpreter main program
  438.  
  439. interp.$(OBJ): interp.c $(GH) \
  440.   errors.h estack.h name.h dict.h oper.h ostack.h packed.h save.h store.h stream.h
  441.     $(CC) $(CFLAGS) interp.c
  442. #    $(CCINT) interp.c
  443.  
  444. gs.$(OBJ): gs.c $(GH) alloc.h estack.h ostack.h store.h stream.h
  445.  
  446.  
  447. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  448. #    Distributed by Free Software Foundation, Inc.
  449. #
  450. # This file is part of Ghostscript.
  451. #
  452. # Ghostscript is distributed in the hope that it will be useful, but
  453. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  454. # to anyone for the consequences of using it or for whether it serves any
  455. # particular purpose or works at all, unless he says so in writing.  Refer
  456. # to the Ghostscript General Public License for full details.
  457. #
  458. # Everyone is granted permission to copy, modify and redistribute
  459. # Ghostscript, but only under the conditions described in the Ghostscript
  460. # General Public License.  A copy of this license is supposed to have been
  461. # given to you along with Ghostscript so you can know your rights and
  462. # responsibilities.  It should be in a file named COPYING.  Among other
  463. # things, the copyright notice and this notice must be preserved on all
  464. # copies.
  465.  
  466. # makefile for Ghostscript device drivers.
  467.  
  468. # -------------------------------- Catalog ------------------------------- #
  469.  
  470. # It is possible to build Ghostscript with an arbitrary collection of
  471. # device drivers, although many drivers are supported only on a subset
  472. # of the target platforms.  The currently available drivers are:
  473.  
  474. # Displays:
  475. #    bgi    Borland Graphics Interface   [MS-DOS only]
  476. #    ega    EGA display   [MS-DOS only]
  477. # +    mdb10    EIZO MDB-10 display (1024 x 768)   [MS-DOS only]
  478. # *    pe    Private Eye display  [MS-DOS only]
  479. # +    sonyfb    Sony Microsystems monochrome display   [Sony only]
  480. #    sunview  SunView window system   [SunOS only]
  481. #    vga    VGA display   [MS-DOS only]
  482. #    x11    X Windows version 11, release >=3   [Unix only]
  483. # Printers:
  484. #    bit    A "bit bucket" device for time benchmarking
  485. # +    bj10e    Canon BubbleJet BJ10e  [MS-DOS only]
  486. # +    deskjet  H-P DeskJet   [MS-DOS & Unix]
  487. #    epson    Epson dot matrix printers   [MS-DOS & Unix]
  488. # +    laserjet  H-P LaserJet   [MS-DOS & Unix]
  489. # +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression   [ditto]
  490. # +    ljet3    H-P LaserJet III* with Delta Row compression   [ditto]
  491. # +    nwp533  Sony Microsystems NWP533 laser printer   [Sony only]
  492. # +    paintjet  H-P PaintJet color printer [MS-DOS & Unix]
  493. # *    trufax    TruFax facsimile driver  [Unix only]
  494.  
  495. # User-contributed drivers marked with * require hardware or software
  496. # that is not available to Aladdin Enterprises.  Please contact the
  497. # original contributors, not Aladdin Enterprises, if you have questions.
  498. # Contact information appears in the driver entry below.  Drivers marked
  499. # with a + are maintained by Aladdin Enterprises with the assistance of
  500. # users, since Aladdin Enterprises doesn't have the hardware for these
  501. # either.
  502.  
  503. # If you add drivers, it would be nice if you kept each list
  504. # in alphabetical order.
  505.  
  506. # Each platform-specific makefile must contain lines of the form
  507. #    DEVICES=<dev1> ... <devn>
  508. #    DEVICE_DEVS=<dev1>.dev ... <devn>.dev
  509. #    DEVICE_OBJS=$(<dev1>_) ... $(<devn>_)
  510. # where dev1 ... devn are the devices to be included in the build.
  511. # dev1 will be used as the default device.  Don't forget the _s!
  512. # On MS-DOS platforms, the first two of these lines must appear *before*,
  513. # and the last *after*, the lines
  514. #    (!)include gdevs.mak
  515. #    (!)include ghost.mak
  516. # in the makefile.  On Unix systems, these device definition lines
  517. # may appear anywhere in the makefile.
  518. #
  519. # The executable must be linked with all the files named in DEVICE_OBJS.
  520. # On MS-DOS platforms, this is done by constructing a file called
  521. # gconfig.tr, to get around the limit on the length of a DOS command line.
  522.  
  523. # ---------------------------- End of catalog ---------------------------- #
  524.  
  525. # If you want to add a new device driver, the examples below should be
  526. # enough of a guide to the correct form for the makefile rules.
  527. #
  528. # ****** IMPORTANT NOTE ******
  529. #
  530. # The names of the relocatable (.OBJ) files for MS-DOS drivers
  531. # must be unique in the first *7* characters, because of the way
  532. # the makefile eliminates duplicates.
  533.  
  534. # All device drivers depend on the following
  535. # (note that we include some indirect dependencies explicitly):
  536.  
  537. GDEV=$(AK) gs.h gx.h gsmatrix.h gxbitmap.h gxdevice.h
  538.  
  539. ###### ------------------- MS-DOS display devices ------------------- ######
  540.  
  541. ### All the devices use the same driver, with different parameters.
  542.  
  543. gdevegaa.$(OBJ): gdevegaa.asm
  544.  
  545. ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_)
  546. ega.exe: $(ETEST) libc$(MM).tr
  547.     tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr
  548.  
  549. ega.$(OBJ): ega.c $(GDEV)
  550.  
  551. PCFB=gdevpcfb.$(OBJ) gdevegaa.$(OBJ)
  552.  
  553. gdevpcfb.$(OBJ): gdevpcfb.c $(GDEV)
  554.  
  555. ### -------------------------- The EGA device -------------------------- ###
  556.  
  557. ega_=$(PCFB)
  558. ega.dev: $(ega_)
  559.     .$(DS)gssetdev ega.dev $(ega_)
  560.  
  561. ### -------------------------- The VGA device -------------------------- ###
  562.  
  563. vga_=$(PCFB)
  564. vga.dev: $(vga_)
  565.     .$(DS)gssetdev vga.dev $(vga_)
  566.  
  567. ### ---------------------- The EIZO MDB-10 device ---------------------- ###
  568.  
  569. mdb10_=$(PCFB)
  570. mdb10.dev: $(mdb10_)
  571.     .$(DS)gssetdev mdb10.dev $(mdb10_)
  572.  
  573. ###### --------- The BGI (Borland Graphics Interface) device -------- ######
  574.  
  575. bgi_=gdevbgi.$(OBJ) egavga.$(OBJ)
  576. bgi.dev: $(bgi_)
  577.     .$(DS)gssetdev bgi.dev $(bgi_)
  578.  
  579. gdevbgi.$(OBJ): gdevbgi.c $(GDEV)
  580.  
  581. # The next line upsets Acorn's AMU (make)
  582. # egavga.$(OBJ): $(BGIDIR)\egavga.bgi
  583. #     $(BGIDIR)\bgiobj $(BGIDIR)\egavga
  584.  
  585. ###### ------------------- The Private Eye display ------------------- ######
  586. ### Note: this driver was contributed by a user:                          ###
  587. ###   please contact narf@media-lab.media.mit.edu if you have questions.  ###
  588.  
  589. pe_=gdevpe.$(OBJ)
  590. pe.dev: $(pe_)
  591.     .$(DS)gssetdev pe.dev $(pe_)
  592.  
  593. gdevpe.$(OBJ): gdevpe.c $(GDEV)
  594.  
  595. ###### --------------- Memory-buffered printer devices --------------- ######
  596.  
  597. PDEVH=$(GDEV) gxdevmem.h gxclist.h gdevprn.h
  598.  
  599. gdevprn.$(OBJ): gdevprn.c $(PDEVH)
  600.  
  601. ### ---------------------- The bit bucket device ----------------------- ###
  602.  
  603. bit_=gdevbit.$(OBJ) gdevprn.$(OBJ)
  604. bit.dev: $(bit_)
  605.     .$(DS)gssetdev bit.dev $(bit_)
  606.  
  607. gdevbit.$(OBJ): gdevbit.c $(PDEVH)
  608.  
  609. ### ----------------- The Canon BubbleJet BJ10e device ----------------- ###
  610.  
  611. bj10e_=gdevbj10.$(OBJ) gdevprn.$(OBJ)
  612. bj10e.dev: $(bj10e_)
  613.     .$(DS)gssetdev bj10e.dev $(bj10e_)
  614.  
  615. gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
  616.  
  617. ### ----------- The H-P DeskJet and LaserJet printer devices ----------- ###
  618.  
  619. ### These are essentially the same device.
  620.  
  621. HPMONO=gdevdjet.$(OBJ) gdevprn.$(OBJ)
  622.  
  623. gdevdjet.$(OBJ): gdevdjet.c $(PDEVH)
  624.  
  625. deskjet_=$(HPMONO)
  626. deskjet.dev: $(deskjet_)
  627.     .$(DS)gssetdev deskjet.dev $(deskjet_)
  628.  
  629. laserjet_=$(HPMONO)
  630. laserjet.dev: $(laserjet_)
  631.     .$(DS)gssetdev laserjet.dev $(laserjet_)
  632.  
  633. ### Selecting ljet2p provides TIFF (mode 2) compression on LaserJet III,
  634. ### IIIp, IIId, IIIsi, IId, and IIp. 
  635.  
  636. ljet2p_=$(HPMONO)
  637. ljet2p.dev: $(ljet2p_)
  638.     .$(DS)gssetdev ljet2p.dev $(ljet2p_)
  639.  
  640. ### Selecting ljet3 provides Delta Row (mode 3) compression on LaserJet III,
  641. ### IIIp, IIId, IIIsi.
  642.  
  643. ljet3_=$(HPMONO)
  644. ljet3.dev: $(ljet3_)
  645.     .$(DS)gssetdev ljet3.dev $(ljet3_)
  646.  
  647. ### ----------------- The generic Epson printer device ----------------- ###
  648. ### Note that you can set the default density in the command line below. ###
  649.  
  650. epson_=gdevepsn.$(OBJ) gdevprn.$(OBJ)
  651. epson.dev: $(epson_)
  652.     .$(DS)gssetdev epson.dev $(epson_)
  653.  
  654. gdevepsn.$(OBJ): gdevepsn.c $(PDEVH) gdevs.mak
  655.     $(CCC) -DX_DPI=180 -DY_DPI=180 gdevepsn.c
  656.  
  657. ### ------------ The H-P PaintJet color printer device ----------------- ###
  658. ### Note: this driver was contributed by users:                          ###
  659. ###       please contact marc@vlsi.polymtl.ca if you have questions.     ###
  660. ### The files are packaged separately from the rest of the fileset.      ###
  661.  
  662. paintjet_=gdevpjet.$(OBJ) gdevprn.$(OBJ)
  663. paintjet.dev: $(paintjet_)
  664.     .$(DS)gssetdev paintjet.dev $(paintjet_)
  665.  
  666. gdevpjet.$(OBJ): gdevpjet.c $(PDEVH)
  667.  
  668. ###### ------------------ Sony frame buffer device ----------------- ######
  669.  
  670. sonyfb_=gdevsnfb.$(OBJ) gdevprn.$(OBJ)
  671. sonyfb.dev: $(sonyfb_)
  672.     .$(DS)gssetdev sonyfb.dev $(sonyfb_)
  673.  
  674. gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
  675.  
  676. ###### ----------------- Sony NWP533 printer device ----------------- ######
  677.  
  678. nwp533_=gdevn533.$(OBJ) gdevprn.$(OBJ)
  679. nwp533.dev: $(nwp533_)
  680.     .$(DS)gssetdev nwp533.dev $(nwp533_)
  681.  
  682. gdevn533.$(OBJ): gdevn533.c $(PDEVH)
  683.  
  684. ###### --------------------- The SunView device --------------------- ######
  685.  
  686. sunview_=gdevsun.$(OBJ)
  687. sunview.dev: $(sunview_)
  688.     .$(DS)gssetdev sunview.dev $(sunview_)
  689.  
  690. gdevsun.$(OBJ): gdevsun.c $(GDEV) arch.h
  691.  
  692. ### ----------------- The TruFax facsimile device ---------------------- ###
  693. ### Note: this driver was contributed by users:                          ###
  694. ###       please contact nao@bellcore.com if you have questions.         ###
  695. ### Note that the driver requires a file encode_l.o supplied by the      ###
  696. ###   makers of the TruFax product.                                      ###
  697.  
  698. trufax_=gdevtrfx.$(OBJ) gdevprn.$(OBJ) encode_l.$(OBJ)
  699. trufax.dev: $(trufax_)
  700.     .$(DS)gssetdev trufax.dev $(trufax_)
  701.  
  702. gdevtrfx.$(OBJ): gdevtrfx.c $(GDEV)
  703.  
  704. ###### ----------------------- The X11 device ----------------------- ######
  705.  
  706. x11_=gdevx.$(OBJ)
  707. x11.dev: $(x11_)
  708.     .$(DS)gssetdev x11.dev $(x11_)
  709.  
  710. ### Note: if the X11 client header libraries are located in a directory
  711. ### which your compiler automatically searches, you may remove the -I switch
  712. ### from the compilation line below; if not, you may have to edit the line
  713. ### so that it mentions the correct directory.
  714. gdevx.$(OBJ): gdevx.c $(GDEV) gdevx.h
  715.     $(CCC) -I/usr/local/X/include gdevx.c
  716.  
  717. ###---------------------- Acorn Archimedes device ---------------------------###
  718. # Unlike the standard devices, we just specify the extra files that need to be
  719. # compiled.
  720.  
  721. gp_arc.$(OBJ): gp_arc.c string_.h gx.h gp.h $(RLIB).h.os $(RLIB).h.win \
  722.  $(WIMPPLUS).h.wimpc $(WIMPPLUS).h.wimpio $(RLIB).h.dbox $(RLIB).h.event gp_arc.h
  723. # $(CCDEBUG) -o $@ c.$*
  724.  
  725. gdevarc.$(OBJ): gdevarc.c gx.h gsmatrix.h gxbitmap.h gxdevice.h \
  726.  $(WIMPPLUS).h.wimpc $(RLIB).h.os $(RLIB).h.bbc $(RLIB).h.wimp \
  727.  $(RLIB).h.wimpt $(RLIB).h.win $(RLIB).h.event $(RLIB).h.saveas \
  728.  $(RLIB).h.colourtran $(RLIB).h.sprite $(RLIB).h.werr \
  729.  $(WIMPPLUS).h.wimpio gdevarc.h gp_arc.h
  730. # $(CCDEBUG) -o $@ c.$*
  731.  
  732. gdevarc1.$(OBJ): gdevarc1.c gx.h gsmatrix.h gxbitmap.h gxdevice.h \
  733.  $(WIMPPLUS).h.wimpc $(RLIB).h.os $(RLIB).h.bbc $(RLIB).h.wimp \
  734.  $(RLIB).h.wimpt $(RLIB).h.saveas \
  735.  $(RLIB).h.colourtran $(RLIB).h.sprite $(RLIB).h.magnify $(RLIB).h.dbox \
  736.  $(WIMPPLUS).h.wimpio gdevarc.h gp_arc.h
  737. # $(CCDEBUG) -o $@ c.$*
  738.  
  739. PLATARC=gdevarc.o gdevarc1.o gp_arc.o
  740.  
  741. ###---------------- Final part of the makefile for the Archimedes -------###
  742.  
  743. # Auxiliary programs
  744. genarch: genarch.o
  745.  $(LINK) genarch o.genarch $(EXTRALIBS)
  746.  squeeze genarch
  747.  
  748. genarch.o: genarch.c
  749.  
  750. # ----------------------------- Main program ------------------------------ #
  751.  
  752. # (Dummy) tracing package
  753.  
  754. utrace.$(OBJ): utrace.c cframe_.h
  755.  
  756. # Main program
  757.  
  758. # Interpreter main program
  759.  
  760. GSARC=o.gs o.gp_arc o.gdevarc o.gdevarc1 $(LIB) $(INT) o.gsmain o.utrace
  761.  
  762. # The executable (gs) is called !RunImage on the Archimedes
  763. !RunImage: $(GSARC)
  764.  $(LINK) !RunImage $(EXTRALIBS) -via gs-via
  765.  squeeze !RunImage
  766. # $(LINKDEBUG) !RunImage $(EXTRALIBS) -via gs-via
  767.